<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const arr1 = [1, 2, 3]
    const arr2 = [11, 22, 33]
    // 展开运算符 可以展开数组
    console.log(...arr1)

    
    // 1 求数组最大值
    console.log(Math.max(...arr1))
    console.log(Math.min(...arr1))
    // 2. 合并数组
    console.log(...arr1,...arr2)
    const arr = [10,20,30,40]
    function fn(...data){
      console.log(data)
    }
    fn(...arr)
  </script>
</body>

</html>